import type { RouteRecordRaw } from 'vue-router';

const routes: RouteRecordRaw[] = [
  {
    meta: {
      icon: 'lucide:layers',
      order: -1,
      title: 'Demo',
    },
    name: 'Demo',
    path: '/demo',
    children: [
      {
        name: 'intersection',
        path: '/intersection',
        meta: {
          icon: 'lucide:bird',
          title: 'IntersectionObserver',
        },
        children: [
          {
            name: 'lazy',
            path: '/lazy',
            component: () => import('#/views/demo/lazy/index.vue'),
            meta: {
              icon: 'lucide:bot',
              title: 'lazy',
            },
          },
          {
            name: 'loadMore',
            path: '/loadMore',
            component: () => import('#/views/demo/loadMore/index.vue'),
            meta: {
              icon: 'lucide:bot',
              title: 'loadMore',
            },
          },
        ],
      },
      {
        name: 'pdf',
        path: '/pdf',
        component: () => import('#/views/demo/pdf/index.vue'),
        meta: {
          icon: 'carbon:workspace',
          title: 'PDF预览',
        },
      },
      {
        name: 'map',
        path: '/map',
        component: () => import('#/views/demo/map/index.vue'),
        meta: {
          icon: 'ic:baseline-map',
          title: '地图',
        },
      },
    ],
  },
  {
    meta: {
      icon: 'lucide:layers',
      title: 'Canvas',
    },
    name: 'Canvas',
    path: '/canvas',
    children: [
      {
        name: 'canvasDemo',
        path: '/canvasDemo',
        component: () => import('#/views/canvas/demo/index.vue'),
        meta: {
          icon: 'carbon:workspace',
          title: 'canvasDemo',
        },
      },
    ],
  },
  // 大屏可视化
  {
    meta: {
      icon: 'ic:baseline-insert-chart',
      title: '可视化',
      openInNewWindow: true,
      noBasicLayout: true,
    },
    name: 'Screen',
    path: '/screen',
    component: () => import('#/views/screen/index.vue'),
  },
];
export default routes;
